from member.models import Retailer, Employee


def get_retailer_by_openid(openid):
    retailer = Retailer.objects.filter(openid=openid).first()
    return retailer


def get_retailer(openid):
    retailer = Retailer.objects.filter(openid=openid, flag=1).first()
    return retailer


def get_employee_by_openid(openid):
    employee = Employee.objects.filter(openid=openid).first()
    return employee
